//
//  YWEquipmentType.h
//  maintain
//
//  Created by 郑想 on 15/10/26.
//  Copyright © 2015年 ewin. All rights reserved.
//

#import <Foundation/Foundation.h>
@class YWEquipmentSubSystemType;
@class YWEquipmentSystemType;

typedef NS_ENUM(NSUInteger, YWEquipmentFieldTypeId) {
    YWEquipmentFieldTypeIdNumber = 1, // 数字
    YWEquipmentFieldTypeIdString = 2, // 字符
    YWEquipmentFieldTypeIdDownSelect = 3 //下拉
};

@interface YWEquipmentType : NSObject
/**ID*/
@property (nonatomic, assign) NSInteger equipmentTypeId;
/**设备类型名*/
@property (nonatomic, copy) NSString* equipmentTypeName;
/**外部设备*/
@property (nonatomic, assign) NSInteger isExternal;
/**组织机构编号*/
@property (nonatomic, assign) NSInteger organizationNo;
/**自编码*/
@property (nonatomic, copy) NSString* ownCode;
/**子系统*/
@property (nonatomic, strong)YWEquipmentSubSystemType *equipmentSubSystemType;
/**系统*/
@property (nonatomic, strong)YWEquipmentSystemType *equipmentSystemType;
/**数据更新时间*/
@property (nonatomic, assign) NSTimeInterval updateTime;
/**状态删除，未删除*/
@property (nonatomic, assign) NSInteger status;
@end

@interface YWShortEquipmentType : NSObject
/**ID*/
@property (nonatomic, assign) NSInteger equipmentTypeId;
/**设备类型名*/
@property (nonatomic, copy) NSString* equipmentTypeName;
@end

@interface YWEquipmentFieldType : NSObject
/**属性类型ID*/
@property (nonatomic, assign) YWEquipmentFieldTypeId fieldTypeId;
/**属性类型名称*/
@property (nonatomic, copy) NSString* fieldTypeName;
/**属性类型代码*/
@property (nonatomic, copy) NSString* fieldTypeCode;
@end

//-------下拉列表对象
@interface YWEquipmentFieldOption : NSObject
/**提交维保任务，下拉列表参数值取此字段*/
@property (nonatomic, assign) NSInteger fieldOptionId;
/**界面展示使用*/
@property (nonatomic, copy) NSString* fieldOptionText;
@end

//-------运行参数
@interface YWRunTimeParameter : NSObject
/**属性ID*/
@property (nonatomic, assign) NSInteger fieldId;
/**属性名称*/
@property (nonatomic, copy) NSString* fieldName;
/**属性名称*/
@property (nonatomic, strong) YWEquipmentFieldType* fieldType;
/**是否必填*/
@property (nonatomic, assign) NSInteger required;
/**状态删除，未删除*/
@property (nonatomic, assign) NSInteger status;
/**合理范围最大值*/
@property (nonatomic, assign) NSInteger maxFieldValue;
/**合理范围最小值*/
@property (nonatomic, assign) NSInteger minFieldValue;
/**下拉列表选项的集合（fieldTypeId=3时才有值）*/
@property (nonatomic, strong) NSArray *options;
/**设备类型对象*/
@property (nonatomic, strong) YWEquipmentType *equipmentType;
/**更新时间*/
@property (nonatomic, assign) NSTimeInterval createTime;
/**维保类型ID*/
@property (nonatomic, assign) NSInteger maintenanceTypeId;

/**当前的值*/
@property (nonatomic, copy) NSString* fieldValue;
/**下拉列表选项的*/
@property (nonatomic, strong) YWEquipmentFieldOption* fieldOptionValue;
@end


@interface YWEquipmentSubSystemType : NSObject
/**ID*/
@property (nonatomic, assign) NSInteger subSystemTypeId;
/**子系统类型名*/
@property (nonatomic, copy) NSString* subSystemTypeName;

@property (nonatomic, strong) NSArray *equipmentTypeArray;
@end

@interface YWEquipmentSystemType : NSObject
/**ID*/
@property (nonatomic, assign) NSInteger systemTypeId;
/**系统类型名*/
@property (nonatomic, copy) NSString* systemTypeName;
@end

/**-------------分配检测保养时请求设备类型总数和完成数*/
@interface YWAssignMissionCount : NSObject
/**设备类型总数*/
@property (nonatomic, assign) NSInteger equipmentTypeQuantity;
/**完成数*/
@property (nonatomic, assign) NSInteger finishQuantity;
/**已分配数量*/
@property (nonatomic, assign) NSInteger distributeQuantity;
/**维保周期*/
@property (nonatomic, assign) NSInteger maintenanceCycle;
@end
